﻿<!-- saved from url=(0022)http://internet.e-mail -->
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>藏边旅游网_页面高度的研究</title>
<script type="text/javascript" src="/html/js/jquery-1.4.2.js"></script>
<style>
	html{
		margin-top:0px;
	}
	*{margin:0;padding:0;}
	body{
		font-family:"Verdana","宋体";
		font-size:12px;
		background-color:#eee;
		padding-top:10px;
	}
	.wrap{
		width:1500px;
		height:260px;
		background-color:#f5f5f5;
		border:1px #dcac9a solid;
		padding-left:50px;
		margin-left:50px;
		position:relative;
		margin-top:10px;
	}
	.client{
		width:1000px;
		height:200px;
		background-color:#f5f5f5;
		border:1px #dcac9a solid;
		padding-left:50px;
		margin-left:50px;
		position:relative;
		margin-top:10px;
		display:none;
	}
	.box{
		width:200px;
		height:200px;
		background-color:#e0ffff;
		border: 10px #46dca2 solid;
		padding-left:10px;
		overflow:auto;
		margin-left:10px;
		position:relative;
		
	}
</style>
<script type="text/javascript" >
	function measure(){
		logger.clear();		
		//jQuery获取的值
		logger.log({'key':'来源','value':"jQuery"},true);
		logger.hr();
		var window_height = $(window).height();
		logger.log({'key':'window_height','value':window_height});
		
		var window_scrollTop_jquery = $(window).scrollTop();
		logger.log({'key':'window_scrollTop_jquery','value':window_scrollTop_jquery});
		
		logger.hr();
		
		var html_height = $(document.documentElement).height();
		logger.log({'key':'html_height','value':html_height});
		
		var html_scrollTop_jquery = $(document.documentElement).scrollTop();
		logger.log({'key':'html_scrollTop_jquery','value':html_scrollTop_jquery});
		
		logger.hr();
		
		var document_height = $(document).height();
		logger.log({'key':'document_height','value':document_height});
		
		var document_scrollTop_jquery = $(document).scrollTop();
		logger.log({'key':'document_scrollTop_jquery','value':document_scrollTop_jquery});
		
		logger.hr();
		
		var body_height = $(document.body).height();
		logger.log({'key':'body_height','value':body_height});
		
		var body_scrollTop_jquery = $(document.body).scrollTop();
		logger.log({'key':'body_scrollTop_jquery','value':body_scrollTop_jquery});
		
		logger.hr();
		
		//javascript原生的值
		logger.log({'key':'来源','value':"javascript原生属性"},true);
		logger.hr();
		//window
		var window_width = window.width;
		logger.log({'key':'window_width','value':window_width},true);
		logger.hr();
		//html
		var html = document.documentElement;
		var html_offsetHeight = html.offsetHeight;
		logger.log({'key':'html_offsetHeight','value':html_offsetHeight},true);
		
		var html_offsetTop = html.offsetTop;
		logger.log({'key':'html_offsetTop','value':html_offsetTop});
		
		var html_clientHeight = html.clientHeight;
		logger.log({'key':'html_clientHeight','value':html_clientHeight});
		
		var html_scrollHeight = html.scrollHeight;
		logger.log({'key':'html_scrollHeight','value':html_scrollHeight});
		
		var html_scrollTop = html.scrollTop;
		logger.log({'key':'html_scrollTop','value':html_scrollTop});
				
		logger.hr();
				
		//document
		var document_offsetHeight = document.offsetHeight;
		logger.log({'key':'document_offsetHeight','value':document_offsetHeight},true);
		
		var document_offsetTop = document.offsetTop;
		logger.log({'key':'document_offsetTop','value':document_offsetTop});
		
		var document_clientHeight = document.clientHeight;
		logger.log({'key':'document_clientHeight','value':document_clientHeight});
		
		var document_scrollHeight = document.scrollHeight;
		logger.log({'key':'document_scrollHeight','value':document_scrollHeight});
		
		var document_scrollTop = document.scrollTop;
		logger.log({'key':'document_scrollTop','value':document_scrollTop});
		
		logger.hr();
		
		//body
		var body = document.body;
		var body_offsetHeight = body.offsetHeight;
		logger.log({'key':'body_offsetHeight','value':body_offsetHeight},true);
		
		var body_offsetTop = body.offsetTop;
		logger.log({'key':'body_offsetTop','value':body_offsetTop});
		
		var body_clientHeight = body.clientHeight;
		logger.log({'key':'body_clientHeight','value':body_clientHeight});
		
		var body_scrollHeight = body.scrollHeight;
		logger.log({'key':'body_scrollHeight','value':body_scrollHeight});
		
		var body_scrollTop = body.scrollTop;
		logger.log({'key':'body_scrollTop','value':body_scrollTop});
		
		logger.hr();
	}
</script>
</head>
<body>
	<div class="wrap">
		<div class="box">
			<p style="border:1px #dcad87 solid">
				ABCDEFGHIJKLMNOPQRSTABCDEFGHIJKLMNOPQRSU
				ABCDEFGHIJKLMNOPQRYZ
				ABCDEFGHIJKLMNOPQRSD
				ABCDEFGHIJKLMNOPQRST
				ABCDEFGHIJKLMNOPQRSU
				ABCDEFGHIJKLMNOPQRST
				ABCDEFGHIJKLMNOPQRYZ
				ABCDEFGHIJKLMNOPQRSD
				ABCDEFGHIJKLMNOPQRST
				ABCDEFGHIJKLMNOPQRSU
				ABCDEFGHIJKLMNOPQRSU
			</p>
		</div>
	</div>
	<div class="client">
		<div>
			<label>外围wrap</label>
			<div>
				width:
				<select>
					<option></option>	
				</select>
			</div>
		</div>
	</div>
	<div style="float:left;margin-left:50px;margin-top:5px">
		<input type="button" value="计算" onclick="measure();" style="height: 32px; width: 99px; "/>
	</div>
	<div style="float:left;margin-left:50px;margin-top:5px"><p id="logger"></p></div>
	
	<div style="height:	1000px;display:block;margin-bottom:10px;"></div>
	<div style="display:block;margin-bottom:10px;">111</div>
	
<script type="text/javascript" >
	var logger = new function(){
		this.log = function(obj,isNewLine){
			var oldS = $("#logger").html();
			var s;
			if(typeof isNewLine !='undefined' && isNewLine==true){
				s = oldS + "</br>" + obj['key'] + ":"+obj['value'];
			}else{
				s = oldS + " " + obj['key'] + ":" + obj['value'];
			}
			$("#logger").html(s);
		};
		this.clear = function(){
			$("#logger").html("");
		}
		this.hr = function(){
			var hr = "<div style='border-bottom:1px blue solid;margin-top:1px;'></div>"
			var oldS = $("#logger").html();
			var s = oldS + hr;
			$("#logger").html(s);
		}
		
	}();
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F981a4babede43d4b65dfce905038f9b5' type='text/javascript'%3E%3C/script%3E"));

</script>
<script>
	$(function(){
		$("a[href*=tongji]").hide();
	});
</script>
</body>
</html>